package partialRDT;

import weka.classifiers.Classifier;
import weka.core.Instances;

/**
 * Abstract class of RDT
 * @author tigerzhong
 *
 */
public abstract class RDT implements Classifier {
    /**
     * Training data
     */
    protected Instances srcData = null;
    /**
      * serialVersionUID
      */
    private static final long serialVersionUID = 1L;
    /**
     * The minimum number of instances in leaf
     */
    private int minNum;
    /**
     * Number of random trees
     */
    private int numTrees;
    /**
     * Depth of the trees
     */
    private int depth;
    /**
     * Ratio of the major class
     */
    private double ratio = 1.0;
    
    // Getter and Setter
    public double getRatio() {
        return ratio;
    }

    public void setRatio(double ratio) {
        this.ratio = ratio;
    }

    public int getNumTrees() {
	return numTrees;
    }

    public int getMinNum() {
	return minNum;
    }

    public void setMinNum(int minNum) {
	this.minNum = minNum;
    }

    public void setNumTrees(int numTrees) {
	if (srcData == null) {
	    this.numTrees = numTrees;
	}
    }

    public int getDepth() {
	return depth;
    }

    public void setDepth(int depth) {
	if (srcData == null) {
	    this.depth = depth;
	}
    }
}
